Skip to content

Split string pointers into fields in ToStringSliceE - #376

Open
Twiink wants to merge 1 commit into
spf13:masterfrom
Twiink:fix/split-string-pointer-fields
Open

Twiink wants to merge 1 commit into
spf13:masterfrom
Twiink:fix/split-string-pointer-fields

Conversation

@Twiink

@Twiink Twiink commented Nov 18, 2026

Copy link
Copy Markdown

A multi-word string passed to ToStringSliceE is split with strings.Fields, but passing a pointer to the same string returns a single element containing the entire string. This changes the result when a configuration binding supplies a pointer. Detect string inputs on the dereferenced value while preserving the original scalar value for conversions that use its methods.

The shared value/pointer test matrix reproduces the discrepancy with spaces and a tab. go test ./... and go vet ./... pass.

@CLAassistant

CLAassistant commented Nov 18, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants